Anticorrosive performance of newly synthesized dipyridine based ionic liquids by experimental and theoretical approaches

Two newly synthetic nontoxic dipyridine-based ionic liquids (PILs) with the same chain lengths and different polar groups were investigated: bispyridine-1-ium tetrafluoroborate (BPHP, TFPHP) with terminal polar groups Br and CF3, respectively, on Carbon steel (CS) in 8M H3PO4 as corrosion inhibitors. Their chemical structure was verified by performing 1HNMR and 13CNMR. Their corrosion inhibition was investigated by electrochemical tests, especially as mass transfer with several characterizations: Scanning electron microscope/Energy dispersive X-ray spectroscopy (SEM–EDX), UV–visible, Atomic force microscope, Atomic absorbance spectroscopy, X-ray Photoelectron Spectroscopy and Gloss value. Theoretical calculation using density functional theory by calculating several parameters, molecular electrostatic potential, Fukui Indices, and Local Dual Descriptors were performed to demonstrate the reactivity behavior and the reactive sites of two molecules with a concentration range (1.25–37.5 × 10–5 M) and temperature (293–318 K). The maximum inhibition efficiency (76.19%) and uniform coverage were sufficient for BPHP at an optimum concentration of 37.5 × 10–5 M with the lowest temperature of 293 K. TFPHP recorded 71.43% at the same conditions. Two PILs were adsorbed following the El-Awady adsorption isotherm, including physicochemical adsorption. The computational findings agree with Electrochemical measurements and thus confirm CS's corrosion protection in an aggressive environment.

Thus, the corresponding PILs 3(a, b) were produced in good yield by thermally alkylating the initial bispyridine hydrazine 1 with two equivalents of 4-substituted-phenacyl bromide 2(a, b) (Fig. 1).The 1 H NMR, 13 C NMR, and mass spectra analysis confirmed the synthesis of the intended 3a.As a result, the two doublets at δ H 6.67 ppm in the 1 H NMR spectrum were assigned to the two new methylene protons (2×COCH 2 ).An extra eight aromatic protons were also recorded at their usual chemical shifts belonging to the two aromatic rings of the phenacyl core.All remaining protons resonated in their respective area.The 13 C NMR spectrum of 3a supported the quaternization reaction, showing the methylene carbons resonating at δ C 66.67 and 66.73 ppm, respectively.
The displacement of the bromide anion (Br − ) and the furnishing of the desired task-specific PILs 4(a, b) in good yield were accomplished by treating the synthesized dipyridinium bromide 3(a, b) with potassium tetrafluoroborate.The success of the anion exchange was unambiguously evidenced by their spectroscopic results, which divulged that there was no change in their 1 H and 13 C NMR data compared to their corresponding starting pyridinium bromide 3(a, b).Correspondingly, the resulting P ILs 4(a, b) structure was deduced based on their 31 P, 11 B, 19 F NMR, and mass spectra.
The structure of P ILs 4 (a, b) showed the presence of a multiple resonating between δ B (−1.64) to (−1.78) ppm in its 11 B spectrum and two doublets at δ F −149.32 and −149.65 ppm in its 19 F NMR spectrum respectively, supported the presence of tetrafluoroborate anion (BF 4 − ) in the P ILs 4 (a, b) as counter anion, more spectral data of synthesis were mentioned in the Supplementary figures 1-6.

Electrode sample and corrosive medium
The corrosive medium, 8 M H 3 PO 4 , was prepared using analytical grade phosphoric acid (85% w/w) supplied by Fisher Chemicals Ltd.The electrode sample used for electrochemical measurements was carbon steel (CS) having a surface area of 10 cm 2 and the composition (wt.%) was determined by JEOL apparatus JSM-IT200 model: 0.14% Carbon, 0.02% Silicon, 0.56% Manganese, 0.03% Phosphorus, 0.01% Nickel, 0.01% Chrome, 0.01%Vanadium, 0.03% Aluminum, 0.04% Sulfur, and 99.15% Iron.We must be aware that the selection of 8 M H 3 PO 4 is based on that the H 3 PO 4 concentration effect on the value of limiting current I Lim can be interpreted via the mass transform concept 10,11 .
All experiments were carried out using 100 ml of the prepared phosphoric acid in various concentrations of the studied P ILs inhibitors (1.25, 2.5, 7.5, 12.5, 17.5, 25 and 37.5) 10 -5 M by dissolving in water for BPHP and TFPHP.The I Lim was recorded for them at different temperatures: 293, 298, 308 and 318 K. Experiments were triple-checked to ensure the measurements were accurate and the results were within 2% error.The reported corrosion data is the average of the three measurements.

Galvano-static polarization measurements
Due to its simplicity and accuracy, the Galvano-static technique may be a common tool to survey inhibitors' inhibition efficiency.Within the present study, standard methods that were described previously were used to perform the polarization experiments [10][11][12][13] .

Spectroscopic analysis
After corrosion exposure by applying galvanic polarization, several characterizations were applied to CS in 8M H 3 PO 4 without (blank) and with P ILs inhibitors.
The quantity of Fe 2+ was recorded by atomic absorption spectroscopy (AAS) estimated by ANALYTIK JENA CONTRAA 300 AAS to know the amount of iron ions passed into the solution after corrosion measurements and that for environmental protection.
The roughness of the CS surface was shown by atomic force microscope (AFM) Auto probe cp-research head manufactured by Thermomicrpscope operated in contact mode using Silicon Nitride probe model MLCT manufactured by Bruker.Proscan 1.8 software was used for controlling the scan parameters.Scan parameters: (contact mode, scan area 25 × 25 µm 2 , scan rate 1 Hz, number of data points 256 × 256 points) and IP 2.1 software for image analysis.
UV-visible reflectance spectroscopy (Jasco V-570) in the 200-700 nm range was used to get the brightness degree and reflection spectra.
Ultraviolet-visible absorption spectrophotometry [Pg instruments t-80 UV-Visible spectrophotometer] was used to recognize the absorption of metal and inhibitors in the solution.
Scanning electron microscope (SEM) shows the shielding layer on the CS surface and its morphological characterization.It coupled with the electron disperses X-ray spectroscopy (EDX) analyzer to determine the elemental constituents of layers formed on the corroded surface using a JEOL apparatus JSM-IT200 model.
X-ray photoelectron spectroscopy (XPS) analyses were performed by K-ALPHA (Themo Fischer Scientific, USA) with monochromatic X-ray AL K-alpha radiation (energy − 10 to 1,350 eV) under a vacuum of 10-9 with full-spectrum pass energy 200 eV at narrow-spectrum 50 eV.The analysis spot size was 400 μm in diameter.All binding energy values were determined concerning the C1s line originating from adventitious carbon.

Theoretical studies
On the other hand, the theoretical calculations achieved the experimental data using Gaussian-09 with DFT results with method B3LYP/6-311G (d, p) showing the structures and electronic properties in the gas and liquid phase.

Galvanostatic polarization curves
The electrochemical polarization experiments were conducted to understand the kinetics and suppression mechanism the studied PILs inhibitors provided at the CS/H 3 PO 4 interface.This goal was provided by the analysis of current-potential curves obtained from Galvanostatic measurements.It can be seen from Fig. 2 and Table 1 that adding P ILs compounds (BPHP & TFPHP) significantly reduced the corrosion limiting current values by increasing inhibitor concentrations and enhancements by temperatures compared to the blank curve.P ILs inhibitors block the active sites of the CS surface, indicating that the corrosion of the iron electrode after the adsorption of P ILs was more difficult, and two P ILs showed excellent corrosion resistance.The values of inhibition efficiency (%I Eff ) and the degree of the surface coverage was computed by the following Eq.(1) 13, 42 : where I Lim (blank) and I Lim (P ILs ) are the limiting currents without and with a concentration of inhibitors, respectively.As seen in Table 1, the % I Eff were enhanced with increasing inhibitor concentration to reach 76.19-71.43%for 37.5 × 10 -5 M of BPHP and TFPHP, respectively.By the way, when adding a higher concentration of the inhibitor than 37.5 × 10 -5 M to the solution, the inhibitor would be desorbed from the surface of the metal.Even though, due to the desorption of the inhibitor molecules by increased temperatures, the I Eff of P ILs decrease from 76.19 to 46.20% in the case of temperature variation.This may be attributed to the high dissolution rates of CS at elevated temperatures due to increased solution agitation resulting from the high rate of H 2 gas evolution.This may also reduce the ability of inhibitors to be adsorbed on the CS surface.The results tabulated indicate that the investigated molecules work by adhering to the CS surface and assisting in forming an inhibitory layer that serves as a barrier between the CS surface and the corrosive media's constituent parts.Since BPHP has a bigger I Eff than TFPHP and a lower desorption rate than TFPHP; it is a better inhibitor than the other one (Fig. 3).www.nature.com/scientificreports/

Adsorption isotherm behavior and thermodynamics parameters
It would be precious to make sense of the adsorption processing by a fitting adsorption isotherm, which could give further helpful bits of knowledge into the association of the inhibitor with the metal surface and, subsequently, the system of corrosion restraint.To decide the best adsorption isotherm model, which improves the degree of surface coverage area (θ) upon the CS surface.As could be seen, the formation of a defensive layer over the metallic surface, which reduces the reactive surface area for corrosive ion adhesion and hence mitigates corrosion, was shown as the inhibitor quantity was increased by the increase in the θ across the CS substrate.The direct types of considered adsorption isotherm models are as the following: Langmuir, El-Awady and Flory-Huggins applied for the studied P ILs (BPHP &TFPHP), were determined at 298 K for different concentrations.The direct types of considered adsorption isotherms are described in Table 2, where θ = surface coverage = I Eff %, C P ILs is the P ILs concentration, y is the number of inhibitor molecules involving one dynamic site, x is the number of water atoms supplanted by one particle of the inhibitor, and K ads is the constant of equilibrium of the adsorption interaction, which is temperature dependent.It is related to the free energy of adsorption according to Eq. ( 2): R, T, and 55.5 M are the ideal gas constant, work temperature (293-318 K), and water content, respectively.Figure 4 shows the linear fit according to the curve derived from the Galvanostatic technique.The adsorption parameters deduced from these isotherms and values of the determination coefficient (R 2 ) are regrouped in Table 2.
(2) �G ads = −RTln (55.5 K ads )  43,44 .Besides, the Langmuir model did not achieve; it remains hypothetical and often referred to as ideal adsorption, which is not really applicable in concrete complex electrochemical systems.Electrochemical systems are often referred to as either ideal or non-ideal adsorptions because of the different assumptions on which each adsorption isotherm is based.So, we were obliged to test other isotherm models, namely El-Awady and Flory-Huggins.
It should be pointed out that El-Awady and Flory-Huggin's isotherm can be used to examine the number of water molecules that can be replaced by one inhibitor molecule on the CS surface.
As shown in Fig. 4b, the linear form of Flory Huggins adsorption isotherm as log θ/C PILs vs log (1−θ) at 298 K.The obtained data reported in Table 2 yielded a linear correlation coefficient (R 2 ) with slope (x) and intercept (xK).We found that the calculated values of (x) were higher than unity, implying that one BPHP and TFPHP molecule replaces more than a water molecule at a constant temperature.
On the other hand, the curve fitting of the El-Awady model is shown in Fig. 4c, d at different temperatures, and the calculated values of K, K′ and 1/y are listed in Table 3.The strong correlations confirm the validity of the approach.The values of 1/y ensure that every molecule in the adsorbent mechanism is linked to greater than one active site on the CS outermost layer.It is confirmed that the corrosion inhibitor forms a dense multilayer physisorption of P ILs molecules on the CS surface.
Table 2 shows that the values of K ads obtained from the El-Awady model were large compared to Flory Huggins's adsorption isotherm.In addition, the large value of K ads indicates the high adsorptive power of BPHP.On the other hand, Table 3 shows the high values of K ads observed at low temperatures mean that strong interactions of the P ILs molecules with the Fe were favored at this temperature.
The free energy of adsorption (∆G ads ) values are assigned from K ads values of the El-Awady adsorption model, which showed the best correlation with the experimental data.The computed values of ∆G ads for the P ILs compounds at various temperatures are recorded in Table 3. Negative signs of ∆G ads elucidate the spontaneous adsorption of the studied P ILs on the CS surface 45 .The ∆G ads values range from −32.13 to -31.78 kJ.mol -1 for BPHP and from −31.37 to −31.09 kJ.mol -1 for TFPHP, clarifying that the P ILs adsorption process in 8M H 3 PO 4 involves both physisorption and chemisorption mechanisms (physicochemical), which signifies a complex mode between CS and inhibitor molecules [46][47][48][49] .In another way, physicochemical meaning involves electrostatic interactions between the charged molecules and the metal (physisorption) and also sharing or transfer of electron pairs or π electrons from organic molecules to the metal surface to form a coordinate bond (chemisorption).
Else important thermodynamic parameters are obtained by Vant't Hoff equation, which is utilized to assess enthalpy of adsorption (∆H ads ) by plotting lnK ads vs 1/T.A linear relation is gained with a slope equal to (−∆H ads ) /R).The values of (∆H ads ) were computed and registered in Table 3.The negative amount of ∆H ads shows that the adsorption of the inhibitor is an exothermic interaction; this outcome might make sense of how the adsorption is consistent, and afterward, the inhibition decreases with expanding temperature.In this work, the values of ∆H ads for the adsorption of the inhibitor are − 35.46 kJ/mol for BPHP and −34.33 kJ/mol for TFPHP.This value is closer to − 40 kJmol −1 and far from − 100 kJmol −1 .It implies that the adsorption of P ILs follows physicochemical 50 .The Gibbs-Helmholtz equation is utilized to deduce the standard entropy of the adsorption (∆°S ads ) at 298 K according to the following Eqs.( 3) and ( 4): (3) www.nature.com/scientificreports/ The negativity of adsorption entropy ∆S°a ds , obtained in this work, suggests a reduction in the translational degrees of freedom and perturbation, possibly due to the accumulation of water molecules on the surface.
The active thermodynamic model used for driving the heat of adsorption (Q ads ) for extra increased understanding of the adsorption procedure using Eq. ( 5) 51 : where A is a constant and C P ILs is the concentration of inhibitors, Fig. 5 shows the relation between log θ 1−θ with 1000 T , the slope equals −( Q 2.303R ) .For the BPHP (Q ads = − 28.872 kJ/mol) and TFPHP (Q ads = − 27.349 kJ/ mol).The negative value of Q ads shows that the surface coverage level diminishes with a temperature rise in the  www.nature.com/scientificreports/presence of inhibitors and exothermic processes 52,53 .The higher absolute value of BPHP means that its molecules were adsorbed more than TFPHP.
To recognize physisorption and chemisorption, the isotherm of Dubinin-Radushkevich has been utilized and described as follows 54 : where θ max is the maximum surface coverage, and δ is the Polanyi potential described by: By plotting ln θ against δ 2 Fig. 6, the constant a was obtained from the slope.The values of a prompt the mean adsorption energy E m for the different temperatures are in Table 4 This energy, which is the exchange energy of 1 mol of adsorbate from the solution bulk to the outer layer of the adsorbent, is characterized as: The extent of E m gives data about the kind of adsorption type to be chemisorption or physisorption: E m values under 8 kJmol -1 demonstrate physical adsorption, while those higher than 8 kJmol −1 recommend chemisorption, so the E m values mean physical adsorption for the two inhibitors [54][55][56][57] .

Kinetic parameters
The kinetic model was another helpful tool for making sense of the erosion resistance and further explaining the inhibitors' features.The activation energy values E a were evaluated via the linearized form of the Arrhenius equation with a temperature range of (293-318 K) for CS disintegration in the absence and presence of BPHP and TFPHP as follows: The linear regression plots between ln I Lim versus 1000/T are presented in Fig. 7; the values of E a (energy of activation) are derived from the slopes = ( − E a /R) where gas constant R = 8.314 JK −1 mol −1 and A is that the factor of frequency.The calculated data at different inhibitor concentrations were collected in Table 5.The change in the values of the apparent activation energies may be explained by the corrosion process's mechanism alterations in the presence of adsorbed P ILs inhibitor molecules.
It was observed that E a for the uninhibited solution is lower than that of the inhibited solution, supposing that the dissolution of CS is slow within the existence of P ILs inhibitors.The inhibitor is adsorbed on the most active adsorption sites (having the lowest energy), and the corrosion process takes place predominantly on the active sites of higher energy.Inspection of the data shows that E a values increase in the presence of the BPHP or TFPHP 46,58,59 , and the values of TFPHP were smaller than BPHP.This indicates that the energy barrier between the reactants and the activated complex depends on the chemical composition of the inhibitor.Because of the expanded energy hindrance for metal dissolving, this information demonstrates how the inhibitors can restrict consumption.The creation of a coating layer covering the surface goes about as an energy, furthermore, mass exchange boundary, raising the activation energy.
The enthalpy ∆H ≠ and entropy ∆S ≠ of activation were frequently determined by utilizing the substitutional recipe of the Arrhenius equation, change state condition as follows: where h is Planck's constant, N is Avogadro's number, and T is the temperature.From Table 5, the E a and ∆H ≠ values shifted similarly, allowing us to confirm the known thermodynamic response between the E a and ∆H ≠ as Eq.(11), which is equivalent to the average value of RT (2. 53 kJ/mol) at the average temperature (308 K) of the domain investigation.
∆H ≠ positive values show that forming the activated complex is an endothermic process.∆S ≠ values can be determined from the intercepts (equal to ln (R/Nh) + (∆S ≠ /R)).The negative ∆S ≠ values of the inhibitors indicated that the activated complex within the rate-determining step addresses association rather than dissociation.This means that increasing ordering occurs on going from reactants to activate complex, and this may result from the P ILs inhibitor molecules' adsorption from the acidic solution and may be viewed as a quasi-substitution process between the water molecules at the CS electrode and the P ILs substance in the aqueous phase.The change in free energy activation (∆G ≠ ) was determined from the Arrhenius with the Eq. ( 12):  www.nature.com/scientificreports/∆G ≠ values are positive, increasing in the inhibited case more than in the blank case 10,60,61 .

Atomic absorption spectroscopy measurements (AAS)
AAS is a sensitive, relatively affordable, spectrometric element-selective detector, making it ideal for determining a wide range of elements at trace and ultra-trace levels.Additionally, based on the solubility of the corrosion products, it is a powerful analytical approach used to forecast the corrosion rate in various media, including acidic, basic, and neutral media.Based on the amounts of iron (Fe 2+ ) in the protected and unprotected systems, the absorbance percentage inhibition efficiency (%€AAS) of the P ILs on the CS surface in 8M H 3 PO 4 solution was obtained using Eq. ( 13) 61 .According to the AAS data in Table 6, solutions with BPHP inhibitor have lower concentrations of (Fe 2+ ) as the temperature drops or the concentration rises than solutions without inhibitor.www.nature.com/scientificreports/BPHP inhibitor has lower ions of (Fe 2+ ) because it is more effective at inhibiting corrosion than TFPHP 62 .Therefore, inhibitors have a strong indication for inhibiting the corrosion of CS.
where C blank and C inh are (Fe 2+ ) ions concentrations in the absence and presence of the P ILs inhibitors.

UV-visible analysis
To demonstrate how a complex form, UV-VIS analysis was used with the metal cations (Fe 2+ ) and P ILs under study.Without adding any inhibitor, the CS electrode was subjected to the corrosive 8 M H 3 PO 4 electrolyte at 293 K (Blank).The two PILs were also dissolved at a high molar concentration (37.5 × 10 -5 M) in the same corrosive electrolyte used for the blank sample (solution A = P IL + 8 M H 3 PO 4 ).In addition, a different solution (solution B = P IL + CS + 8 M H 3 PO 4 ) contained a CS electrode and a predetermined molar concentration of P ILs (37.5 × 10 -5 M) dissolved and submerged once more in the same corrosive electrolyte (8 M H 3 PO 4 ) at 293 K.For each P ILs inhibitor, the UV was measured for the three different solutions 11 , and the absorption wavelengths were noted and demonstrated in Fig. 8.The resulting wavelengths for the blank solution were 225, and 300 nm, which could be attributed to π-π*(C = C) and n-π* (C = O) transition, respectively.While in the case of solution A, the observed absorption values for the C=C bond due to (π-π*) were 235 nm, and the C=O bond due to (n-π*) was 310 nm for TFPHP.For BPHP, recorded high absorbance (hypochromic shift) at 240 and 320 nm is employed for C=C (π-π*) and C=O (n-π*), respectively.Additionally, for solution B, the absorption peak values were ( 13) changed and shifted to 230 nm for C=C (π-π*), 305 nm for C=O (n-π*) in the case of TFPHP, and for BPHP, the absorption values appeared at 235 nm for C=C (π-π*) and for 310 nm C=O (n-π*) (bathochromic shift) 63 .Moreover, the results mentioned above reveal an important distinction in the absorption peaks in Fig. 8 between www.nature.com/scientificreports/BPHP and TFPHP, suggesting that BPHP is the most effective inhibitor.This spectroscopic method provides proof of the complex formation between P ILs inhibitors and metallic electrodes 64 .

SEM and EDX spectroscopy
To support the results mentioned above, films on CS surfaces were examined using an SEM-EDX study after exposure to aggressive acidic media.The distinct elements present on the CS surface of each film can be identified using the EDX technique, as can the elemental changes that resulted during immersion in 8M H 3 PO 4 solution free of and with P ILs under various concentrations and temperatures 65,66 .The results of the EDX spectra in Fig. 9 demonstrate that the key elements of the existence of the element on the CS surface are shown by the solutionfree inhibitor (blank).It is also observed in Table 7 that the percentage atomic content of O and P remarkably reduced by changing inhibitor and temperature due to CS surface coverage by a homogeneous adsorbed film.Additionally, the surface characterization of CS samples (×5000), where the surface was highly destroyed under inhibitor-free conditions, confirmed the adsorption of P ILs .After the adsorption of P ILs , By the way, the hetero atoms such as C and O indicate that at the active sites of adsorption, the surface becomes smoother when the percent of Fe and C increase, O and P decrease with increasing inhibition of the corrosion.The inhibition and the surface smoothing, as observed from SEM Fig. 9, are directly probational with increasing the concentration; the least smoothing surface is blank (%Fe = 37.On the other hand, BPHP has more inhibition than TFPHP at the same concentration and temperature because BPHP forms more surface coating than TFPHP.However, it can be noticed from EDX recorded in the presence of P ILs in Fig. 9 the appearance of new peaks related to the N atom, which act as active centers of these inhibitors for adsorption and forming a protected film on the CS surface.On the other hand, Br appeared on the EDX diagram for BPHP due to the difference between two structures: the terminal group, Br, for BPHP and CF 3 group for TFPHP and the group BF 4 -the negative ion for both inhibitors where F appeared in the EDX.

Atomic force microscopy (AFM)
Presently, several imaging techniques are now available that can provide accurate three-dimensional topographies and information about the irregularities on the sample surface.One uses an AFM to provide quantitative analysis rather than SEM micrographs' qualitative analysis 67 .Figure 10a-f illustrates the 2D and 3D morphological characteristics of CS surfaces immersed in 8 M H 3 PO 4 at various temperatures and concentrations with and without P ILs inhibitor BPHP or TFPHP.Table 8 lists the values for the average surface roughness (Ra), which reflects the deviation in height, the root means square roughness (Rq), which represents the deviation in surface heights, and the maximum peak to valley depth (Rp-v).
The P ILs layer on the CS surface in solution-free inhibitors is shown in Fig. 10.Direct contact with 8M H 3 PO 4 media totally damages the corroded CS surface with an average roughness (Ra) of 0.62 μm, Rq of 0.79 μm, and Rp-v of 5.00 μm.On the other hand, as the inhibition increased, the parameters roughness decreased 68 , resulting in an improvement of the surface quality film and the formation of a more uniform film that was observed by adding the optimum concentration of TFPHP (37.5 × 10 -5 M) at 293 K.These parameters roughness magnitude decreased to Ra of 0.18 μm, Rq of 0.25 μm, and Rp-v of 2.31 μm.This coating is a barrier between the metal and the corrosive medium and considerably prevents CS deterioration.However, the surface roughness parameters decreased in the presence of BPHP Fig. 11, owing to the more protective activity of adsorbed inhibitor molecules on the CS surface rather than TFPHP, as evidenced by a decrease in average surface roughness values.Table 8 shows the percent inhibition (%I Eff ) increased with increasing the concentration and decreasing the temperature for BPHP.By comparing the parameters, the values of BPHP were less than TFPHP values, which proved that BPHP has higher inhibition efficiency and is more adsorbed than TFPHP.

UV spectral reflectance studies (Gloss value)
UV-visible diffuse reflectance spectroscopy of the CS surface was analyzed before and after immersion in 8M H 3 PO 4 in the 200-700 nm range.The reflectance curves examined the function spectra of the coated film on the CS surface with different P ILs inhibitor concentrations at different temperatures to identify iron phosphate.The blank sample (before corrosion) showed a low gloss value (G = 18.2, dull), as shown in Fig. 12. Conversely, all samples coated with P ILs in different conditions were electrolytically corroded, where they showed higher gloss values 69 .In the case of the lower concentrations, the gloss value will be G = 21.7 (BPHP) and G = 19.2(TFPHP), and optimum concentration G = 38.1 (BPHP) and G = 26 (TFPHP).Under different temperatures for BPHP, surface brightness was observed to increase by decreasing temperature to G = 38.1 at 293 K and G = 24.7 at 318 K.This indicates the reduction of the surface roughness and increasing the reflectance value as BPHP has more efficiency in inhibition rather than TFPHP due to forming a protective film on the metal surface.

XPS analysis
X-ray photoelectron spectroscopy (XPS) was utilized to analyze the elemental composition and chemical bonds which formed on the CS surface before and after the adsorption of P ILs .This analytical technique played a crucial role in enhancing our comprehension of the underlying mechanism of adsorption.
XPS of iron, Fig. 13, showed two main peaks corresponding to 2p 3/2 appeared at 711.48 (711.00) and 2p 1/2 at 724.48(724.48)eV with a difference of 13 (13.48)eV, before and (after)adsorption indicating the presence of iron as various iron substrate Fe 3 O 4 or FeO (Fe 2+ ) and Fe 2 O 3 (Fe 3+ ) 70,71 .However, The binding energy values in the Figure 14 shows the XPS spectra for C1s, O1s, P2p, and N1s, before and after adsorption.Three peaks of C1s at 284.99, 286.64, and 288.81 eV in the blank sample showed a slight shift in the B.E. values to 284.78, 286.53, and 288.38eV after treatment by inhibitor (Fig. 141-A, B).These peaks correspond to aromatic C, CN, and CO 72,74 .A very large decrease in the peak area of peaks corresponding to CN or CO indicates the change in their media.For O1s spectrum was deconvoluted into two peaks at 531.64 and 533.18 eV corresponding to the Fe-O and O-C bonds, respectively, whereas the peaks were shifted to lower binding energies after adsorption at 531.58 and 529.97 eV, which could be attributed to its bonding to O-C, O-Fe(II)and/or Fe(III) ions (Fig. 142-A, B) 72 .P2p spectrum showed two deconvoluted peaks at 133.69 and 134.66 eV, which may attributed to PO 3  The XPS scan after adsorption showed the presence of Boron (B), Fluorine (F), and Bromine (Br), which are shown in detail in Fig. 14(5-7).B1s displayed a characteristic boride peak at 189.1 eV, which is a smaller value than that of B-B that could be attributed to metal or carbon center attachment 77,78 .This is also can be evidenced by the difference in the N1s and C1s scans before and after adsorption.Fluorine showed F1s peak at 689.2 eV, which may be attributed to F-C bonding confirming its existence 79 .Bromine displayed two peaks corresponding to Br 3d with binding energies (B.E.) of 72.77 and 70.20 eV (ΔE = 2.57), which may be attributed to Br-C and/ charge transfer from Br to iron in either oxidation state II and/or III.The presence of B, F and Be elements confirms the adsorption of BPHP as a protective inhibitor on the CS surface 80 .

Computational investigation study
Quantum chemical descriptors, including E HOMO , E LUMO , Energy gap (∆E = E LUMO -E HOMO ), chemical hardness, chemical softness, electronegativity, chemical potential, proton affinity, electrophilicity, and nucleophilicity, are well-known for being beneficial and efficient tools in investigations of metal corrosion.Sup.Tables (1-4) provide an overview of the selected P ILs atoms of global molecular properties in the gas phase and aqueous solution 81,82 .The following will cover the relationships between descriptors and the order of corrosion inhibition efficiencies.
The Figured quantum compound properties for BPHP & TFPHP in the gas and fluid phases are given in Table 10.The geometry optimization is displayed in Fig. 15.The capacity of a particle to adsorb onto the metal surface is related to the hypothesis of frontier molecular orbital (FMO).E HOMO alludes to the capacity of atoms to give electrons to the iron surface with empty "d" orbitals.The higher the energy level of the HOMO (E HOMO ), the more susceptible the ligand is to donate the electrons to the iron atoms to form a stronger bond.This could illustrate the compound's effectiveness in inhibiting the atoms' capacity to give electrons.
For this reason, BPHP is more effective than TFPHP in electron donation in the two phases.In concurrence with the calculation's outcomes, the E HOMO of BPHP is the biggest.Subsequently, this compound is viewed as more reasonable for adsorption on the metallic surface through the pyridine ring, which is a rich source of electrons.In contrast, E LUMO demonstrates the acceptance of electrons by the atoms where the lower value of E LUMO , the more prominent the inhibitor effectiveness.The energy gap (∆E gap ) plays a vital role in the reactivity of  www.nature.com/scientificreports/particles toward the metal surface.The lower value of ∆E gap is the more tendency of atoms to adsorb on the metal surface.Table 10 shows that ∆E gap for TFPHP in the gas phase is lower than in water.On the other hand, ∆E gap values for BPHP are lower than those for TFPHP, showing that BPHP has a high reactivity in both phases.The calculations of (FMOs) of (BPHP & TFPHP) were performed by B3LYP/6-311g (d,p) Gaussian-09 program using density functional theory (DFT) 83,84 , and the Gaussian View 5.0 was used to show the structural forms in Fig. 16.
where the electronic density site ρ with the number of electrons (N) at site k in a molecule.

Inhibition mechanism
According to the previous discussion, BPHP and TFPHP operate physically, chemically, or through both (physicochemical) adsorption to reduce the effectiveness of the employed solution (8 M H 3 PO 4 ) on the CS surface.On the CS surface or due to the protonation of the inhibitor's heteroatoms in the bulk solution, charged species are present in the physical model.On the other hand, the chemisorption could be increased by transferring charge from the electron-rich centers (the lone pair of the heteroatom or the π-electrons of the unsaturated centers) of the inhibitor to the CS vacant d-orbitals (Fe 2+ ) 89 , which reduces surface erosion as shown in Fig. 18.By comparing the N (−0.3014) and O (−0.2952) of TFPHP, the calculated Milliken atomic charges of N (−0.3020) and O (−0.2968) of BPHP are more negative.Because the CF 3 polar group is more electron withdrawing than Br, the presence of the CF 3 may reduce the amount of charge transfer from the inhibitors to the CS surface.These findings might demonstrate how BPHP inhibits more effectively than TFPHP.www.nature.com/scientificreports/Br is more electron rich, softer, with positive Fukui parameters than CF 3 .We hope to use the new P ILs in another process, like Electroplating, to transfer layers of different metals to another metal surface.

Data availability
The data used and analyzed during the current study are available from the corresponding authors upon reasonable request.

Figure 2 .
Figure 2. Polarization curves of the tested CS (a, b) at different P ILs concentrations at 293 K & (c, d) at different temperatures for P ILs concentration 37.5 × 10 -5 M.

Figure 4 .
Figure 4. P ILs adsorption isotherm models for CS tested electrodes in 8 M H 3 PO 4 with different concentrations for isotherm equations in Table 2 (a) Langmuir model by plotting (b) Flory-Huggin's model.Elawady model (c) BPHP (d) TFPHP.

Figure 5 .
Figure 5.The active thermodynamic model used for driving the heat of adsorption (Q ads ).

5 Figure 7 .
Figure 7. Arrhenius graphs for determination energy of activation from the relation between limiting current and temperature with and without P ILs (a) BPHP (b) TFPHP.

Figure 8 .
Figure 8. Spectra of uv-visible comparison at same concentration 37.5 × 10 -5 M and temperature 293 K. (a) TFPHP before and after immersing in CS with blank.(b) BPHP before and after immersing in CS with blank.(c) BPHP and TFPHP after corrosion.

Figure 11 .
Figure 11.Relation between average roughness (Ra) and inhibition efficiency (%I Eff ) at different concentrations and temperatures for BPHP and blank.

Figure 12 .
Figure 12.The gloss reflectance of P ILs .(a) comparison between blank and P ILs with 37.5 × 10 -5 M P ILs at 293 K.(b) comparison between blank and P ILs at with 1.25 × 10 -5 M P ILs at 293 K. (c) comparison for BPHP with 37.5 × 10 -5 M at different temperatures 293 and 318 K.

Figure 17 .
Figure 17.Fukui indices (a, b) and local dual descriptors (c, d) of different atoms with respect to Mulliken charges of P ILs .

Figure 18 .
Figure 18.Schematic mechanism diagram of adsorption P ILs on CS surface in 8M H 3 PO 4 .

Table 1 .
Limiting current (I lim ) values and inhibition efficiency (%I Eff ) with and without P ILs at different temperatures and concentrations.

I EFF % T (K) BPHP TFPHP Figure 3. The effect of temperature on the inhibition efficiency (%I Eff ) at constant concentration (37.5 × 10 -5 M) of P ILs .
Figure 4a represents Langmuir's adsorption relationship with linear correlation coefficient (R 2 ) values approaching one.The outcomes indicate that the Langmuir model displays the best linear relationship, but the slope deviates markedly from unity for BPHP and TFPHP

• ads Table 2 .
Linear isotherm equations and adsorption parameters for P ILs at 298 K.

Table 3 .
Thermodynamic parameters data of P ILs by ELAwady adsorption model.

Table 4 .
Data of Dubinin-Radushkevich adsorption energy isotherm to recognize physical or chemical adsorption.

Table 5 .
The activation parameters values E a , ∆H ≠ , ∆S ≠ and ∆G ≠ with and without P ILs of different concentrations in 8 M H 3 PO 4 .

Table 6 .
Atomic absorption spectroscopy data shows the effect of P ILs with different concentrations and temperatures on iron ions and the absorbance percentage inhibition efficiency (%€AAS).

Table 8 .
Atomic force microscopic parameters for CS in 8 M H 3 PO 4 with and without P ILs at different concentrations and temperatures.
Fukui indices and Local Dual Descriptors describe the electrophilic and nucleophilic attack in the gas phase.

Table 10 .
Data of calculated quantum parameters for P ILs in gas and aqueous phase.